﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSem3.Admin
{
    public partial class WebForm18 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loaddata();

            }
        }

        private void loaddata()
        {
            if (Session["user"] != null)
            {
                ListView1.DataSource = new dataDataContext().Orders.Where(od => od.EmployeeID == ((Employee)Session["user"]).EmployeeID).ToList();
                ListView1.DataBind();
            }
        }
        protected void ListView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
        {
            this.DataPager1.SetPageProperties(e.StartRowIndex,10,false);
            loaddata();
        }
    }
}